{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 查看所有的网络连接\n",
    "\n",
    "```sh\n",
    "netstat -ano\n",
    "```\n",
    "\n",
    "协议、本地地址、外部地址、状态、PID\n",
    "\n",
    "## findstr - 过滤\n",
    "\n",
    "使用findstr进行过滤（类似Linux的grep），过滤出包含8081的所有行：\n",
    "\n",
    "```sh\n",
    "netstat -ano | findstr \"LISTENING\"| findstr \"8081\"\n",
    "```\n",
    "\n",
    "## tasklist - 查找相关程序\n",
    "\n",
    "```sh\n",
    "tasklist | findstr \"8081\"\n",
    "```\n",
    "\n",
    "## taskkill - 杀死进程\n",
    "\n",
    "```sh\n",
    "taskkill /pid 8081  -t  -f\n",
    "```\n",
    "\n",
    "- -f 用来强制执行 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
